

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="Description" content="scikit-learn: machine learning in Python">

  
  <title>Version 0.21.3 &mdash; scikit-learn 0.22 documentation</title>
  
  <link rel="canonical" href="http://scikit-learn.org/stable/whats_new/v0.21.html" />

  
  <link rel="shortcut icon" href="../_static/favicon.ico"/>
  

  <link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script> 
</head>
<body>
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
  <div class="container-fluid sk-docs-container px-0">
      <a class="navbar-brand py-0" href="../index.html">
        <img
          class="sk-brand-img"
          src="../_static/scikit-learn-logo-small.png"
          alt="logo"/>
      </a>
    <button
      id="sk-navbar-toggler"
      class="navbar-toggler"
      type="button"
      data-toggle="collapse"
      data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent"
      aria-expanded="false"
      aria-label="Toggle navigation"
    >
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../install.html">Install</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../modules/classes.html">API</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../auto_examples/index.html">Examples</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html">Getting Started</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../tutorial/index.html">Tutorial</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../glossary.html">Glossary</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../developers/index.html">Development</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../faq.html">FAQ</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../related_projects.html">Related packages</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../roadmap.html">Roadmap</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../about.html">About us</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
        </li>
        <li class="nav-item dropdown nav-more-item-dropdown">
          <a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html">Getting Started</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../tutorial/index.html">Tutorial</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../glossary.html">Glossary</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../developers/index.html">Development</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../faq.html">FAQ</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../related_projects.html">Related packages</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../roadmap.html">Roadmap</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../about.html">About us</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
          </div>
        </li>
      </ul>
      <div id="searchbox" role="search">
          <div class="searchformwrapper">
          <form class="search" action="../search.html" method="get">
            <input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
            <input class="sk-search-text-btn" type="submit" value="Go" />
          </form>
          </div>
      </div>
    </div>
  </div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
    <input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
    <label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
    <div id="sk-sidebar-wrapper" class="border-right">
      <div class="sk-sidebar-toc-wrapper">
        <div class="sk-sidebar-toc-logo">
          <a href="../index.html">
            <img
              class="sk-brand-img"
              src="../_static/scikit-learn-logo-small.png"
              alt="logo"/>
          </a>
        </div>
        <div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
            <a href="v0.22.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.22.0">Prev</a><a href="../whats_new.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Release History">Up</a>
            <a href="v0.20.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.20.4">Next</a>
        </div>
        <div class="alert alert-danger p-1 mb-2" role="alert">
          <p class="text-center mb-0">
          <strong>scikit-learn 0.22</strong><br/>
          <a href="http://scikit-learn.org/dev/versions.html">Other versions</a>
          </p>
        </div>
        <div class="alert alert-warning p-1 mb-2" role="alert">
          <p class="text-center mb-0">
            Please <a class="font-weight-bold" href="../about.html#citing-scikit-learn"><string>cite us</string></a> if you use the software.
          </p>
        </div>
          <div class="sk-sidebar-toc">
            <ul>
<li><a class="reference internal" href="#">Version 0.21.3</a><ul>
<li><a class="reference internal" href="#legend-for-changelogs">Legend for changelogs</a></li>
<li><a class="reference internal" href="#changed-models">Changed models</a></li>
<li><a class="reference internal" href="#changelog">Changelog</a><ul>
<li><a class="reference internal" href="#sklearn-cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#sklearn-compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#sklearn-datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a></li>
<li><a class="reference internal" href="#sklearn-ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a></li>
<li><a class="reference internal" href="#sklearn-impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a></li>
<li><a class="reference internal" href="#sklearn-inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-linear-model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a></li>
<li><a class="reference internal" href="#sklearn-neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
<li><a class="reference internal" href="#sklearn-tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-21-2">Version 0.21.2</a><ul>
<li><a class="reference internal" href="#id1">Changelog</a><ul>
<li><a class="reference internal" href="#sklearn-decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#sklearn-metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a></li>
<li><a class="reference internal" href="#sklearn-preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#sklearn-utils-sparsefuncs"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils.sparsefuncs</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-21-1">Version 0.21.1</a><ul>
<li><a class="reference internal" href="#id2">Changelog</a><ul>
<li><a class="reference internal" href="#id3"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a></li>
<li><a class="reference internal" href="#id4"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a></li>
<li><a class="reference internal" href="#id5"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-21-0">Version 0.21.0</a><ul>
<li><a class="reference internal" href="#id6">Changed models</a></li>
<li><a class="reference internal" href="#known-major-bugs">Known Major Bugs</a></li>
<li><a class="reference internal" href="#id7">Changelog</a><ul>
<li><a class="reference internal" href="#sklearn-base"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a></li>
<li><a class="reference internal" href="#sklearn-calibration"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.calibration</span></code></a></li>
<li><a class="reference internal" href="#id8"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#id9"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#id10"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a></li>
<li><a class="reference internal" href="#id11"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#sklearn-discriminant-analysis"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.discriminant_analysis</span></code></a></li>
<li><a class="reference internal" href="#sklearn-dummy"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.dummy</span></code></a></li>
<li><a class="reference internal" href="#id12"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a></li>
<li><a class="reference internal" href="#sklearn-externals"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.externals</span></code></a></li>
<li><a class="reference internal" href="#sklearn-feature-extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a></li>
<li><a class="reference internal" href="#id13"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a></li>
<li><a class="reference internal" href="#id14"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-isotonic"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.isotonic</span></code></a></li>
<li><a class="reference internal" href="#id15"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a></li>
<li><a class="reference internal" href="#sklearn-manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a></li>
<li><a class="reference internal" href="#id16"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a></li>
<li><a class="reference internal" href="#sklearn-mixture"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a></li>
<li><a class="reference internal" href="#sklearn-model-selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-multiclass"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multiclass</span></code></a></li>
<li><a class="reference internal" href="#sklearn-multioutput"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multioutput</span></code></a></li>
<li><a class="reference internal" href="#id17"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
<li><a class="reference internal" href="#sklearn-neural-network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a></li>
<li><a class="reference internal" href="#sklearn-pipeline"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.pipeline</span></code></a></li>
<li><a class="reference internal" href="#id18"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#sklearn-svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a></li>
<li><a class="reference internal" href="#id19"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a></li>
<li><a class="reference internal" href="#sklearn-utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a></li>
<li><a class="reference internal" href="#multiple-modules">Multiple modules</a></li>
<li><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
</ul>
</li>
<li><a class="reference internal" href="#changes-to-estimator-checks">Changes to estimator checks</a></li>
<li><a class="reference internal" href="#code-and-documentation-contributors">Code and Documentation Contributors</a></li>
</ul>
</li>
</ul>

          </div>
      </div>
    </div>
    <div id="sk-page-content-wrapper">
      <div class="sk-page-content container-fluid body px-md-3" role="main">
        
  <div class="section" id="version-0-21-3">
<span id="changes-0-21-3"></span><h1>Version 0.21.3<a class="headerlink" href="#version-0-21-3" title="Permalink to this headline">¶</a></h1>
<div class="section" id="legend-for-changelogs">
<h2>Legend for changelogs<a class="headerlink" href="#legend-for-changelogs" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span> : something big that you couldn’t do before.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span> : something that you couldn’t do before.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span> : an existing feature now may not require as much computation or
memory.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> : a miscellaneous minor improvement.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> : something that previously didn’t work as documentated – or according
to reasonable expectations – should now work.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> : you will need to change your code to have the same effect in the
future; or a feature will be removed in the future.</p></li>
</ul>
<p><strong>July 30, 2019</strong></p>
</div>
<div class="section" id="changed-models">
<h2>Changed models<a class="headerlink" href="#changed-models" title="Permalink to this headline">¶</a></h2>
<p>The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.</p>
<ul class="simple">
<li><p>The v0.20.0 release notes failed to mention a backwards incompatibility in
<a class="reference internal" href="../modules/generated/sklearn.metrics.make_scorer.html#sklearn.metrics.make_scorer" title="sklearn.metrics.make_scorer"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.make_scorer</span></code></a> when <code class="docutils literal notranslate"><span class="pre">needs_proba=True</span></code> and <code class="docutils literal notranslate"><span class="pre">y_true</span></code> is binary.
Now, the scorer function is supposed to accept a 1D <code class="docutils literal notranslate"><span class="pre">y_pred</span></code> (i.e.,
probability of the positive class, shape <code class="docutils literal notranslate"><span class="pre">(n_samples,)</span></code>), instead of a 2D
<code class="docutils literal notranslate"><span class="pre">y_pred</span></code> (i.e., shape <code class="docutils literal notranslate"><span class="pre">(n_samples,</span> <span class="pre">2)</span></code>).</p></li>
</ul>
</div>
<div class="section" id="changelog">
<h2>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h2>
<div class="section" id="sklearn-cluster">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#sklearn-cluster" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> where computation with
<code class="docutils literal notranslate"><span class="pre">init='random'</span></code> was single threaded for <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code> or <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">=</span> <span class="pre">-1</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12955">#12955</a> by <a class="reference external" href="https://github.com/nixphix">Prabakaran Kumaresshan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.OPTICS.html#sklearn.cluster.OPTICS" title="sklearn.cluster.OPTICS"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.OPTICS</span></code></a> where users were unable to pass
float <code class="docutils literal notranslate"><span class="pre">min_samples</span></code> and <code class="docutils literal notranslate"><span class="pre">min_cluster_size</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14496">#14496</a> by
<a class="reference external" href="https://github.com/someusername1">Fabian Klopfer</a>
and <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> where KMeans++ initialisation
could rarely result in an IndexError. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11756">#11756</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-compose">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#sklearn-compose" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue in <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> where using
DataFrames whose column order differs between :func:<code class="docutils literal notranslate"><span class="pre">fit</span></code> and
:func:<code class="docutils literal notranslate"><span class="pre">transform</span></code> could lead to silently passing incorrect columns to the
<code class="docutils literal notranslate"><span class="pre">remainder</span></code> transformer.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14237">#14237</a> by <code class="docutils literal notranslate"><span class="pre">Andreas</span> <span class="pre">Schuderer</span> <span class="pre">&lt;schuderer&gt;</span></code>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-datasets">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a><a class="headerlink" href="#sklearn-datasets" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_california_housing.html#sklearn.datasets.fetch_california_housing" title="sklearn.datasets.fetch_california_housing"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_california_housing</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_covtype.html#sklearn.datasets.fetch_covtype" title="sklearn.datasets.fetch_covtype"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_covtype</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_kddcup99.html#sklearn.datasets.fetch_kddcup99" title="sklearn.datasets.fetch_kddcup99"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_kddcup99</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_olivetti_faces.html#sklearn.datasets.fetch_olivetti_faces" title="sklearn.datasets.fetch_olivetti_faces"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_olivetti_faces</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_rcv1.html#sklearn.datasets.fetch_rcv1" title="sklearn.datasets.fetch_rcv1"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_rcv1</span></code></a>, and <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_species_distributions.html#sklearn.datasets.fetch_species_distributions" title="sklearn.datasets.fetch_species_distributions"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_species_distributions</span></code></a>
try to persist the previously cache using the new <code class="docutils literal notranslate"><span class="pre">joblib</span></code> if the cached
data was persisted using the deprecated <code class="docutils literal notranslate"><span class="pre">sklearn.externals.joblib</span></code>. This
behavior is set to be deprecated and removed in v0.23.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14197">#14197</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-ensemble">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a><a class="headerlink" href="#sklearn-ensemble" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fix zero division error in <code class="xref py py-func docutils literal notranslate"><span class="pre">HistGradientBoostingClassifier</span></code> and
<code class="xref py py-func docutils literal notranslate"><span class="pre">HistGradientBoostingRegressor</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14024">#14024</a> by <code class="docutils literal notranslate"><span class="pre">Nicolas</span> <span class="pre">Hug</span> <span class="pre">&lt;NicolasHug&gt;</span></code>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-impute">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.impute" title="sklearn.impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a><a class="headerlink" href="#sklearn-impute" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.impute.IterativeImputer.html#sklearn.impute.IterativeImputer" title="sklearn.impute.IterativeImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.IterativeImputer</span></code></a> so that no errors are thrown when there are
missing values in training data. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13974">#13974</a> by <code class="docutils literal notranslate"><span class="pre">Frank</span> <span class="pre">Hoang</span> <span class="pre">&lt;fhoang7&gt;</span></code>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-inspection">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.inspection" title="sklearn.inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a><a class="headerlink" href="#sklearn-inspection" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.inspection.plot_partial_dependence.html#sklearn.inspection.plot_partial_dependence" title="sklearn.inspection.plot_partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.plot_partial_dependence</span></code></a> where
<code class="docutils literal notranslate"><span class="pre">target</span></code> parameter was not being taken into account for multiclass problems.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14393">#14393</a> by <a class="reference external" href="https://github.com/guillemgsubies">Guillem G. Subies</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-linear-model">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a><a class="headerlink" href="#sklearn-linear-model" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> where
<code class="docutils literal notranslate"><span class="pre">refit=False</span></code> would fail depending on the <code class="docutils literal notranslate"><span class="pre">'multiclass'</span></code> and
<code class="docutils literal notranslate"><span class="pre">'penalty'</span></code> parameters (regression introduced in 0.21). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14087">#14087</a> by
<a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Compatibility fix for <a class="reference internal" href="../modules/generated/sklearn.linear_model.ARDRegression.html#sklearn.linear_model.ARDRegression" title="sklearn.linear_model.ARDRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ARDRegression</span></code></a> and
Scipy&gt;=1.3.0. Adapts to upstream changes to the default <code class="docutils literal notranslate"><span class="pre">pinvh</span></code> cutoff
threshold which otherwise results in poor accuracy in some cases.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14067">#14067</a> by <a class="reference external" href="https://github.com/timstaley">Tim Staley</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-neighbors">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#sklearn-neighbors" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neighbors.NeighborhoodComponentsAnalysis.html#sklearn.neighbors.NeighborhoodComponentsAnalysis" title="sklearn.neighbors.NeighborhoodComponentsAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.NeighborhoodComponentsAnalysis</span></code></a> where
the validation of initial parameters <code class="docutils literal notranslate"><span class="pre">n_components</span></code>, <code class="docutils literal notranslate"><span class="pre">max_iter</span></code> and
<code class="docutils literal notranslate"><span class="pre">tol</span></code> required too strict types. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14092">#14092</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-tree">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.tree" title="sklearn.tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a><a class="headerlink" href="#sklearn-tree" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.tree.export_text.html#sklearn.tree.export_text" title="sklearn.tree.export_text"><code class="xref py py-func docutils literal notranslate"><span class="pre">tree.export_text</span></code></a> when the tree has one feature and
a single feature name is passed in. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14053">#14053</a> by <code class="docutils literal notranslate"><span class="pre">Thomas</span> <span class="pre">Fan</span></code>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue with <code class="xref py py-func docutils literal notranslate"><span class="pre">plot_tree</span></code> where it displayed
entropy calculations even for <code class="docutils literal notranslate"><span class="pre">gini</span></code> criterion in DecisionTreeClassifiers.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13947">#13947</a> by <a class="reference external" href="https://github.com/fhoang7">Frank Hoang</a>.</p></li>
</ul>
</div>
</div>
</div>
<div class="section" id="version-0-21-2">
<span id="changes-0-21-2"></span><h1>Version 0.21.2<a class="headerlink" href="#version-0-21-2" title="Permalink to this headline">¶</a></h1>
<p><strong>24 May 2019</strong></p>
<div class="section" id="id1">
<h2>Changelog<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="sklearn-decomposition">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#sklearn-decomposition" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.CCA.html#sklearn.cross_decomposition.CCA" title="sklearn.cross_decomposition.CCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.CCA</span></code></a> improving numerical
stability when <code class="docutils literal notranslate"><span class="pre">Y</span></code> is close to zero. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13903">#13903</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-metrics">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.metrics" title="sklearn.metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a><a class="headerlink" href="#sklearn-metrics" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.euclidean_distances.html#sklearn.metrics.pairwise.euclidean_distances" title="sklearn.metrics.pairwise.euclidean_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.euclidean_distances</span></code></a> where a
part of the distance matrix was left un-instanciated for suffiently large
float32 datasets (regression introduced in 0.21). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13910">#13910</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-preprocessing">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a><a class="headerlink" href="#sklearn-preprocessing" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> where the new
<code class="docutils literal notranslate"><span class="pre">drop</span></code> parameter was not reflected in <code class="docutils literal notranslate"><span class="pre">get_feature_names</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13894">#13894</a>
by <a class="reference external" href="https://github.com/jamesmyatt">James Myatt</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-utils-sparsefuncs">
<h3><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils.sparsefuncs</span></code><a class="headerlink" href="#sklearn-utils-sparsefuncs" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where <code class="xref py py-func docutils literal notranslate"><span class="pre">min_max_axis</span></code> would fail on 32-bit systems
for certain large inputs. This affects <a class="reference internal" href="../modules/generated/sklearn.preprocessing.MaxAbsScaler.html#sklearn.preprocessing.MaxAbsScaler" title="sklearn.preprocessing.MaxAbsScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.MaxAbsScaler</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.normalize.html#sklearn.preprocessing.normalize" title="sklearn.preprocessing.normalize"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.normalize</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.preprocessing.LabelBinarizer.html#sklearn.preprocessing.LabelBinarizer" title="sklearn.preprocessing.LabelBinarizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.LabelBinarizer</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13741">#13741</a> by <a class="reference external" href="https://github.com/rlms">Roddy MacSween</a>.</p></li>
</ul>
</div>
</div>
</div>
<div class="section" id="version-0-21-1">
<span id="changes-0-21-1"></span><h1>Version 0.21.1<a class="headerlink" href="#version-0-21-1" title="Permalink to this headline">¶</a></h1>
<p><strong>17 May 2019</strong></p>
<p>This is a bug-fix release to primarily resolve some packaging issues in version
0.21.0. It also includes minor documentation improvements and some bug fixes.</p>
<div class="section" id="id2">
<h2>Changelog<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id3">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.inspection" title="sklearn.inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a><a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.inspection.partial_dependence.html#sklearn.inspection.partial_dependence" title="sklearn.inspection.partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.partial_dependence</span></code></a> to only check
classifier and not regressor for the multiclass-multioutput case.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14309">#14309</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</div>
<div class="section" id="id4">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.metrics" title="sklearn.metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a><a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances.html#sklearn.metrics.pairwise_distances" title="sklearn.metrics.pairwise_distances"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.pairwise_distances</span></code></a> where it would raise
<code class="docutils literal notranslate"><span class="pre">AttributeError</span></code> for boolean metrics when <code class="docutils literal notranslate"><span class="pre">X</span></code> had a boolean dtype and
<code class="docutils literal notranslate"><span class="pre">Y</span> <span class="pre">==</span> <span class="pre">None</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13864">#13864</a> by <a class="reference external" href="https://github.com/rick2047">Paresh Mathur</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed two bugs in <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances.html#sklearn.metrics.pairwise_distances" title="sklearn.metrics.pairwise_distances"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.pairwise_distances</span></code></a> when
<code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code>. First it used to return a distance matrix with same dtype as
input, even for integer dtype. Then the diagonal was not zeros for euclidean
metric when <code class="docutils literal notranslate"><span class="pre">Y</span></code> is <code class="docutils literal notranslate"><span class="pre">X</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13877">#13877</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</div>
<div class="section" id="id5">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neighbors.KernelDensity.html#sklearn.neighbors.KernelDensity" title="sklearn.neighbors.KernelDensity"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.KernelDensity</span></code></a> which could not be
restored from a pickle if <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> had been used.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13772">#13772</a> by <a class="reference external" href="https://github.com/aditya1702">Aditya Vyas</a>.</p></li>
</ul>
</div>
</div>
</div>
<div class="section" id="version-0-21-0">
<span id="changes-0-21"></span><h1>Version 0.21.0<a class="headerlink" href="#version-0-21-0" title="Permalink to this headline">¶</a></h1>
<p><strong>May 2019</strong></p>
<div class="section" id="id6">
<h2>Changed models<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
<p>The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> for multiclass
classification. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> with ‘eigen’
solver. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.BayesianRidge.html#sklearn.linear_model.BayesianRidge" title="sklearn.linear_model.BayesianRidge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.BayesianRidge</span></code></a> <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p>Decision trees and derived ensembles when both <code class="docutils literal notranslate"><span class="pre">max_depth</span></code> and
<code class="docutils literal notranslate"><span class="pre">max_leaf_nodes</span></code> are set. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> with ‘saga’ solver. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.HashingVectorizer.html#sklearn.feature_extraction.text.HashingVectorizer" title="sklearn.feature_extraction.text.HashingVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text.HashingVectorizer</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html#sklearn.feature_extraction.text.TfidfVectorizer" title="sklearn.feature_extraction.text.TfidfVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text.TfidfVectorizer</span></code></a>, and
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer" title="sklearn.feature_extraction.text.CountVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text.CountVectorizer</span></code></a> <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC.decision_function" title="sklearn.svm.SVC.decision_function"><code class="xref py py-func docutils literal notranslate"><span class="pre">svm.SVC.decision_function</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.multiclass.OneVsOneClassifier.html#sklearn.multiclass.OneVsOneClassifier.decision_function" title="sklearn.multiclass.OneVsOneClassifier.decision_function"><code class="xref py py-func docutils literal notranslate"><span class="pre">multiclass.OneVsOneClassifier.decision_function</span></code></a>. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a> and any derived classifiers. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p>Any model using the <code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model._sag.sag_solver</span></code> function with a <code class="docutils literal notranslate"><span class="pre">0</span></code>
seed, including <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a>,
and <a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeCV.html#sklearn.linear_model.RidgeCV" title="sklearn.linear_model.RidgeCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeCV</span></code></a> with ‘sag’ solver. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeCV.html#sklearn.linear_model.RidgeCV" title="sklearn.linear_model.RidgeCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeCV</span></code></a> when using generalized cross-validation
with sparse inputs. <span class="raw-html"><span class="badge badge-danger">Fix</span></span> </p></li>
</ul>
<p>Details are listed in the changelog below.</p>
<p>(While we are trying to better inform users by providing this information, we
cannot assure that this list is complete.)</p>
</div>
<div class="section" id="known-major-bugs">
<h2>Known Major Bugs<a class="headerlink" href="#known-major-bugs" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>The default <code class="docutils literal notranslate"><span class="pre">max_iter</span></code> for <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> is too
small for many solvers given the default <code class="docutils literal notranslate"><span class="pre">tol</span></code>. In particular, we
accidentally changed the default <code class="docutils literal notranslate"><span class="pre">max_iter</span></code> for the liblinear solver from
1000 to 100 iterations in <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/3591">#3591</a> released in version 0.16.
In a future release we hope to choose better default <code class="docutils literal notranslate"><span class="pre">max_iter</span></code> and <code class="docutils literal notranslate"><span class="pre">tol</span></code>
heuristically depending on the solver (see <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13317">#13317</a>).</p></li>
</ul>
</div>
<div class="section" id="id7">
<h2>Changelog<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h2>
<p>Support for Python 3.4 and below has been officially dropped.</p>
<div class="section" id="sklearn-base">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.base" title="sklearn.base"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a><a class="headerlink" href="#sklearn-base" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The R2 score used when calling <code class="docutils literal notranslate"><span class="pre">score</span></code> on a regressor will use
<code class="docutils literal notranslate"><span class="pre">multioutput='uniform_average'</span></code> from version 0.23 to keep consistent with
<a class="reference internal" href="../modules/generated/sklearn.metrics.r2_score.html#sklearn.metrics.r2_score" title="sklearn.metrics.r2_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.r2_score</span></code></a>. This will influence the <code class="docutils literal notranslate"><span class="pre">score</span></code> method of all
the multioutput regressors (except for
<a class="reference internal" href="../modules/generated/sklearn.multioutput.MultiOutputRegressor.html#sklearn.multioutput.MultiOutputRegressor" title="sklearn.multioutput.MultiOutputRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">multioutput.MultiOutputRegressor</span></code></a>).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13157">#13157</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-calibration">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.calibration" title="sklearn.calibration"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.calibration</span></code></a><a class="headerlink" href="#sklearn-calibration" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Added support to bin the data passed into
<a class="reference internal" href="../modules/generated/sklearn.calibration.calibration_curve.html#sklearn.calibration.calibration_curve" title="sklearn.calibration.calibration_curve"><code class="xref py py-class docutils literal notranslate"><span class="pre">calibration.calibration_curve</span></code></a> by quantiles instead of uniformly
between 0 and 1.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13086">#13086</a> by <a class="reference external" href="https://github.com/srcole">Scott Cole</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Allow n-dimensional arrays as input for
<code class="docutils literal notranslate"><span class="pre">calibration.CalibratedClassifierCV</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13485">#13485</a> by
<a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
</ul>
</div>
<div class="section" id="id8">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  A new clustering algorithm: <a class="reference internal" href="../modules/generated/sklearn.cluster.OPTICS.html#sklearn.cluster.OPTICS" title="sklearn.cluster.OPTICS"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.OPTICS</span></code></a>: an
algorithm related to <a class="reference internal" href="../modules/generated/sklearn.cluster.DBSCAN.html#sklearn.cluster.DBSCAN" title="sklearn.cluster.DBSCAN"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.DBSCAN</span></code></a>, that has hyperparameters easier
to set and that scales better, by <a class="reference external" href="https://github.com/espg">Shane</a>,
<a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>, <a class="reference external" href="https://github.com/kno10">Erich Schubert</a>, <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>, and
<a class="reference external" href="https://github.com/assiaben">Assia Benbihi</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.cluster.Birch.html#sklearn.cluster.Birch" title="sklearn.cluster.Birch"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.Birch</span></code></a> could occasionally raise an
AttributeError. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13651">#13651</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> where empty clusters weren’t
correctly relocated when using sample weights. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13486">#13486</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The <code class="docutils literal notranslate"><span class="pre">n_components_</span></code> attribute in <a class="reference internal" href="../modules/generated/sklearn.cluster.AgglomerativeClustering.html#sklearn.cluster.AgglomerativeClustering" title="sklearn.cluster.AgglomerativeClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.AgglomerativeClustering</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.cluster.FeatureAgglomeration.html#sklearn.cluster.FeatureAgglomeration" title="sklearn.cluster.FeatureAgglomeration"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.FeatureAgglomeration</span></code></a> has been renamed to
<code class="docutils literal notranslate"><span class="pre">n_connected_components_</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13427">#13427</a> by <a class="reference external" href="https://github.com/scouvreur">Stephane Couvreur</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.cluster.AgglomerativeClustering.html#sklearn.cluster.AgglomerativeClustering" title="sklearn.cluster.AgglomerativeClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.AgglomerativeClustering</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.cluster.FeatureAgglomeration.html#sklearn.cluster.FeatureAgglomeration" title="sklearn.cluster.FeatureAgglomeration"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.FeatureAgglomeration</span></code></a> now accept a <code class="docutils literal notranslate"><span class="pre">distance_threshold</span></code>
parameter which can be used to find the clusters instead of <code class="docutils literal notranslate"><span class="pre">n_clusters</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9069">#9069</a> by <a class="reference external" href="https://github.com/VathsalaAchar">Vathsala Achar</a> and <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
</ul>
</div>
<div class="section" id="id9">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> is no longer an experimental
feature. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13835">#13835</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
</ul>
</div>
<div class="section" id="id10">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a><a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Added support for 64-bit group IDs and pointers in SVMLight files.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/10727">#10727</a> by <a class="reference external" href="https://github.com/bryan-woods">Bryan K Woods</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.datasets.load_sample_images.html#sklearn.datasets.load_sample_images" title="sklearn.datasets.load_sample_images"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_sample_images</span></code></a> returns images with a deterministic
order. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13250">#13250</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</div>
<div class="section" id="id11">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.decomposition.KernelPCA.html#sklearn.decomposition.KernelPCA" title="sklearn.decomposition.KernelPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.KernelPCA</span></code></a> now has deterministic output
(resolved sign ambiguity in eigenvalue decomposition of the kernel matrix).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13241">#13241</a> by <a class="reference external" href="https://github.com/bellet">Aurélien Bellet</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.decomposition.KernelPCA.html#sklearn.decomposition.KernelPCA" title="sklearn.decomposition.KernelPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.KernelPCA</span></code></a>, <code class="docutils literal notranslate"><span class="pre">fit().transform()</span></code>
now produces the correct output (the same as <code class="docutils literal notranslate"><span class="pre">fit_transform()</span></code>) in case
of non-removed zero eigenvalues (<code class="docutils literal notranslate"><span class="pre">remove_zero_eig=False</span></code>).
<code class="docutils literal notranslate"><span class="pre">fit_inverse_transform</span></code> was also accelerated by using the same trick as
<code class="docutils literal notranslate"><span class="pre">fit_transform</span></code> to compute the transform of <code class="docutils literal notranslate"><span class="pre">X</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12143">#12143</a> by <a class="reference external" href="https://github.com/smarie">Sylvain Marié</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.decomposition.NMF.html#sklearn.decomposition.NMF" title="sklearn.decomposition.NMF"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.NMF</span></code></a> where <code class="docutils literal notranslate"><span class="pre">init</span> <span class="pre">=</span> <span class="pre">'nndsvd'</span></code>,
<code class="docutils literal notranslate"><span class="pre">init</span> <span class="pre">=</span> <span class="pre">'nndsvda'</span></code>, and <code class="docutils literal notranslate"><span class="pre">init</span> <span class="pre">=</span> <span class="pre">'nndsvdar'</span></code> are allowed when
<code class="docutils literal notranslate"><span class="pre">n_components</span> <span class="pre">&lt;</span> <span class="pre">n_features</span></code> instead of
<code class="docutils literal notranslate"><span class="pre">n_components</span> <span class="pre">&lt;=</span> <span class="pre">min(n_samples,</span> <span class="pre">n_features)</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11650">#11650</a> by <a class="reference external" href="https://github.com/hossein-pourbozorg">Hossein Pourbozorg</a> and
<a class="reference external" href="https://github.com/zjpoh">Zijie (ZJ) Poh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default value of the <code class="code docutils literal notranslate"><span class="pre">init</span></code> argument in
<a class="reference internal" href="../modules/generated/sklearn.decomposition.non_negative_factorization.html#sklearn.decomposition.non_negative_factorization" title="sklearn.decomposition.non_negative_factorization"><code class="xref py py-func docutils literal notranslate"><span class="pre">decomposition.non_negative_factorization</span></code></a> will change from
<code class="code docutils literal notranslate"><span class="pre">random</span></code> to <code class="code docutils literal notranslate"><span class="pre">None</span></code> in version 0.23 to make it consistent with
<a class="reference internal" href="../modules/generated/sklearn.decomposition.NMF.html#sklearn.decomposition.NMF" title="sklearn.decomposition.NMF"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.NMF</span></code></a>. A FutureWarning is raised when
the default value is used.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12988">#12988</a> by <a class="reference external" href="https://github.com/zjpoh">Zijie (ZJ) Poh</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-discriminant-analysis">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.discriminant_analysis" title="sklearn.discriminant_analysis"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.discriminant_analysis</span></code></a><a class="headerlink" href="#sklearn-discriminant-analysis" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> now
preserves <code class="docutils literal notranslate"><span class="pre">float32</span></code> and <code class="docutils literal notranslate"><span class="pre">float64</span></code> dtypes. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8769">#8769</a> and
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11000">#11000</a> by <a class="reference external" href="https://github.com/thibsej">Thibault Sejourne</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  A <code class="docutils literal notranslate"><span class="pre">ChangedBehaviourWarning</span></code> is now raised when
<a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> is given as
parameter <code class="docutils literal notranslate"><span class="pre">n_components</span> <span class="pre">&gt;</span> <span class="pre">min(n_features,</span> <span class="pre">n_classes</span> <span class="pre">-</span> <span class="pre">1)</span></code>, and
<code class="docutils literal notranslate"><span class="pre">n_components</span></code> is changed to <code class="docutils literal notranslate"><span class="pre">min(n_features,</span> <span class="pre">n_classes</span> <span class="pre">-</span> <span class="pre">1)</span></code> if so.
Previously the change was made, but silently. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11526">#11526</a> by
<a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a>
where the predicted probabilities would be incorrectly computed in the
multiclass case. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/6848">#6848</a>, by <a class="reference external" href="https://github.com/agamemnonc">Agamemnon Krasoulis</a> and <code class="docutils literal notranslate"><span class="pre">Guillaume</span> <span class="pre">Lemaitre</span> <span class="pre">&lt;glemaitre&gt;</span></code>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a>
where the predicted probabilities would be incorrectly computed with <code class="docutils literal notranslate"><span class="pre">eigen</span></code>
solver. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11727">#11727</a>, by <a class="reference external" href="https://github.com/agamemnonc">Agamemnon Krasoulis</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-dummy">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.dummy" title="sklearn.dummy"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.dummy</span></code></a><a class="headerlink" href="#sklearn-dummy" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyClassifier.html#sklearn.dummy.DummyClassifier" title="sklearn.dummy.DummyClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyClassifier</span></code></a> where the
<code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> method was returning int32 array instead of
float64 for the <code class="docutils literal notranslate"><span class="pre">stratified</span></code> strategy. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13266">#13266</a> by
<a class="reference external" href="https://github.com/chkoar">Christos Aridas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyClassifier.html#sklearn.dummy.DummyClassifier" title="sklearn.dummy.DummyClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyClassifier</span></code></a> where it was throwing a
dimension mismatch error in prediction time if a column vector <code class="docutils literal notranslate"><span class="pre">y</span></code> with
<code class="docutils literal notranslate"><span class="pre">shape=(n,</span> <span class="pre">1)</span></code> was given at <code class="docutils literal notranslate"><span class="pre">fit</span></code> time. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13545">#13545</a> by <a class="reference external" href="https://github.com/nsorros">Nick
Sorros</a> and <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
</ul>
</div>
<div class="section" id="id12">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a><a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Add two new implementations of
gradient boosting trees: <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingRegressor.html#sklearn.ensemble.HistGradientBoostingRegressor" title="sklearn.ensemble.HistGradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingRegressor</span></code></a>. The implementation of
these estimators is inspired by
<a class="reference external" href="https://github.com/Microsoft/LightGBM">LightGBM</a> and can be orders of
magnitude faster than <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> when the number of samples is
larger than tens of thousands of samples. The API of these new estimators
is slightly different, and some of the features from
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a> are not yet supported.</p>
<p>These new estimators are experimental, which means that their results or
their API might change without any deprecation cycle. To use them, you
need to explicitly import <code class="docutils literal notranslate"><span class="pre">enable_hist_gradient_boosting</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="c1"># explicitly require this experimental feature</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sklearn.experimental</span> <span class="kn">import</span> <span class="n">enable_hist_gradient_boosting</span>  <span class="c1"># noqa</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c1"># now you can import normally from sklearn.ensemble</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sklearn.ensemble</span> <span class="kn">import</span> <span class="n">HistGradientBoostingClassifier</span>
</pre></div>
</div>
<p><a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12807">#12807</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p>
</li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingRegressor.html#sklearn.ensemble.VotingRegressor" title="sklearn.ensemble.VotingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingRegressor</span></code></a>
which provides an equivalent of <a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier" title="sklearn.ensemble.VotingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingClassifier</span></code></a>
for regression problems.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12513">#12513</a> by <a class="reference external" href="https://github.com/stsouko">Ramil Nugmanov</a> and
<a class="reference external" href="https://github.com/mohamed-ali">Mohamed Ali Jamaoui</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Make <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a> prefer threads over
processes when running with <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code> as the underlying decision tree
fit calls do release the GIL. This changes reduces memory usage and
communication overhead. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12543">#12543</a> by <a class="reference external" href="https://github.com/istorch">Isaac Storch</a>
and <a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Make <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a> more memory efficient
by avoiding keeping in memory each tree prediction. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13260">#13260</a> by
<a class="reference external" href="https://ngoix.github.io/">Nicolas Goix</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a> now uses chunks of data at
prediction step, thus capping the memory usage. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13283">#13283</a> by
<a class="reference external" href="https://ngoix.github.io/">Nicolas Goix</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.ensemble.GradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.ensemble.GradientBoostingRegressor</span></code></a> now keep the
input <code class="docutils literal notranslate"><span class="pre">y</span></code> as <code class="docutils literal notranslate"><span class="pre">float64</span></code> to avoid it being copied internally by trees.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13524">#13524</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Minimized the validation of X in
<a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostClassifier.html#sklearn.ensemble.AdaBoostClassifier" title="sklearn.ensemble.AdaBoostClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostRegressor.html#sklearn.ensemble.AdaBoostRegressor" title="sklearn.ensemble.AdaBoostRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostRegressor</span></code></a>
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13174">#13174</a> by <a class="reference external" href="https://github.com/chkoar">Christos Aridas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a> now exposes <code class="docutils literal notranslate"><span class="pre">warm_start</span></code>
parameter, allowing iterative addition of trees to an isolation
forest. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13496">#13496</a> by <a class="reference external" href="https://github.com/petibear">Peter Marko</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  The values of <code class="docutils literal notranslate"><span class="pre">feature_importances_</span></code> in all random forest based
models (i.e.
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier" title="sklearn.ensemble.RandomForestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestRegressor.html#sklearn.ensemble.RandomForestRegressor" title="sklearn.ensemble.RandomForestRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesClassifier.html#sklearn.ensemble.ExtraTreesClassifier" title="sklearn.ensemble.ExtraTreesClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesRegressor.html#sklearn.ensemble.ExtraTreesRegressor" title="sklearn.ensemble.ExtraTreesRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomTreesEmbedding.html#sklearn.ensemble.RandomTreesEmbedding" title="sklearn.ensemble.RandomTreesEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomTreesEmbedding</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a>, and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a>) now:</p>
<ul class="simple">
<li><p>sum up to <code class="docutils literal notranslate"><span class="pre">1</span></code></p></li>
<li><p>all the single node trees in feature importance calculation are ignored</p></li>
<li><p>in case all trees have only one single node (i.e. a root node),
feature importances will be an array of all zeros.</p></li>
</ul>
<p><a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13636">#13636</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13620">#13620</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p>
</li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a>, which didn’t support
scikit-learn estimators as the initial estimator. Also added support of
initial estimator which does not support sample weights. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12436">#12436</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12983">#12983</a> by
<a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed the output of the average path length computed in
<a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a> when the input is either 0, 1 or 2.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13251">#13251</a> by <a class="reference external" href="https://github.com/albertcthomas">Albert Thomas</a>
and <a class="reference external" href="https://github.com/joshuakennethjones">joshuakennethjones</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> where
the gradients would be incorrectly computed in multiclass classification
problems. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12715">#12715</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> where
validation sets for early stopping were not sampled with stratification.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13164">#13164</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> where
the default initial prediction of a multiclass classifier would predict the
classes priors instead of the log of the priors. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12983">#12983</a> by
<a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier" title="sklearn.ensemble.RandomForestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestClassifier</span></code></a> where the
<code class="docutils literal notranslate"><span class="pre">predict</span></code> method would error for multiclass multioutput forests models
if any targets were strings. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12834">#12834</a> by <a class="reference external" href="https://github.com/elsander">Elizabeth Sander</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.gradient_boosting.LossFunction</span></code> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.gradient_boosting.LeastSquaresError</span></code> where the default
value of <code class="docutils literal notranslate"><span class="pre">learning_rate</span></code> in <code class="docutils literal notranslate"><span class="pre">update_terminal_regions</span></code> is not consistent
with the document and the caller functions. Note however that directly using
these loss functions is deprecated.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/6463">#6463</a> by <a class="reference external" href="https://github.com/movelikeriver">movelikeriver</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <code class="xref py py-func docutils literal notranslate"><span class="pre">ensemble.partial_dependence</span></code> (and consequently the new
version <a class="reference internal" href="../modules/generated/sklearn.inspection.partial_dependence.html#sklearn.inspection.partial_dependence" title="sklearn.inspection.partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.inspection.partial_dependence</span></code></a>) now takes sample
weights into account for the partial dependence computation when the
gradient boosting model has been trained with sample weights.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13193">#13193</a> by <a class="reference external" href="https://github.com/samronsin">Samuel O. Ronsin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <code class="xref py py-func docutils literal notranslate"><span class="pre">ensemble.partial_dependence</span></code> and
<code class="xref py py-func docutils literal notranslate"><span class="pre">ensemble.plot_partial_dependence</span></code> are now deprecated in favor of
<a class="reference internal" href="../modules/generated/sklearn.inspection.partial_dependence.html#sklearn.inspection.partial_dependence" title="sklearn.inspection.partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.partial_dependence</span></code></a>
and
<a class="reference internal" href="../modules/generated/sklearn.inspection.plot_partial_dependence.html#sklearn.inspection.plot_partial_dependence" title="sklearn.inspection.plot_partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.plot_partial_dependence</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12599">#12599</a> by <a class="reference external" href="https://github.com/trevorstephens">Trevor Stephens</a> and
<a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier" title="sklearn.ensemble.VotingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingRegressor.html#sklearn.ensemble.VotingRegressor" title="sklearn.ensemble.VotingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingRegressor</span></code></a> were failing during <code class="docutils literal notranslate"><span class="pre">fit</span></code> in one
of the estimators was set to <code class="docutils literal notranslate"><span class="pre">None</span></code> and <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> was not <code class="docutils literal notranslate"><span class="pre">None</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13779">#13779</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier" title="sklearn.ensemble.VotingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingRegressor.html#sklearn.ensemble.VotingRegressor" title="sklearn.ensemble.VotingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingRegressor</span></code></a> accept <code class="docutils literal notranslate"><span class="pre">'drop'</span></code> to disable an estimator
in addition to <code class="docutils literal notranslate"><span class="pre">None</span></code> to be consistent with other estimators (i.e.,
<a class="reference internal" href="../modules/generated/sklearn.pipeline.FeatureUnion.html#sklearn.pipeline.FeatureUnion" title="sklearn.pipeline.FeatureUnion"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.FeatureUnion</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a>).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13780">#13780</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-externals">
<h3><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.externals</span></code><a class="headerlink" href="#sklearn-externals" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecated <code class="xref py py-mod docutils literal notranslate"><span class="pre">externals.six</span></code> since we have dropped support for
Python 2.7. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12916">#12916</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-feature-extraction">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_extraction" title="sklearn.feature_extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a><a class="headerlink" href="#sklearn-feature-extraction" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  If <code class="docutils literal notranslate"><span class="pre">input='file'</span></code> or <code class="docutils literal notranslate"><span class="pre">input='filename'</span></code>, and a callable is given as
the <code class="docutils literal notranslate"><span class="pre">analyzer</span></code>, <a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.HashingVectorizer.html#sklearn.feature_extraction.text.HashingVectorizer" title="sklearn.feature_extraction.text.HashingVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text.HashingVectorizer</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html#sklearn.feature_extraction.text.TfidfVectorizer" title="sklearn.feature_extraction.text.TfidfVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text.TfidfVectorizer</span></code></a>, and
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer" title="sklearn.feature_extraction.text.CountVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text.CountVectorizer</span></code></a> now read the data
from the file(s) and then pass it to the given <code class="docutils literal notranslate"><span class="pre">analyzer</span></code>, instead of
passing the file name(s) or the file object(s) to the analyzer.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13641">#13641</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
</ul>
</div>
<div class="section" id="id13">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.impute" title="sklearn.impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a><a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.impute.IterativeImputer.html#sklearn.impute.IterativeImputer" title="sklearn.impute.IterativeImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.IterativeImputer</span></code></a>, which is a strategy
for imputing missing values by modeling each feature with missing values as a
function of other features in a round-robin fashion. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8478">#8478</a> and
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12177">#12177</a> by <a class="reference external" href="https://github.com/sergeyf">Sergey Feldman</a> and <a class="reference external" href="https://github.com/benlawson">Ben Lawson</a>.</p>
<p>The API of IterativeImputer is experimental and subject to change without any
deprecation cycle. To use them, you need to explicitly import
<code class="docutils literal notranslate"><span class="pre">enable_iterative_imputer</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sklearn.experimental</span> <span class="kn">import</span> <span class="n">enable_iterative_imputer</span>  <span class="c1"># noqa</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c1"># now you can import normally from sklearn.impute</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sklearn.impute</span> <span class="kn">import</span> <span class="n">IterativeImputer</span>
</pre></div>
</div>
</li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  The <a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.impute.IterativeImputer.html#sklearn.impute.IterativeImputer" title="sklearn.impute.IterativeImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.IterativeImputer</span></code></a> have a new parameter <code class="docutils literal notranslate"><span class="pre">'add_indicator'</span></code>,
which simply stacks a <a class="reference internal" href="../modules/generated/sklearn.impute.MissingIndicator.html#sklearn.impute.MissingIndicator" title="sklearn.impute.MissingIndicator"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.MissingIndicator</span></code></a> transform into the
output of the imputer’s transform. That allows a predictive estimator to
account for missingness. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12583">#12583</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13601">#13601</a> by <a class="reference external" href="https://github.com/DanilBaibak">Danylo Baibak</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  In <a class="reference internal" href="../modules/generated/sklearn.impute.MissingIndicator.html#sklearn.impute.MissingIndicator" title="sklearn.impute.MissingIndicator"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.MissingIndicator</span></code></a> avoid implicit densification by
raising an exception if input is sparse add <code class="docutils literal notranslate"><span class="pre">missing_values</span></code> property
is set to 0. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13240">#13240</a> by <a class="reference external" href="https://github.com/btel">Bartosz Telenczuk</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed two bugs in <a class="reference internal" href="../modules/generated/sklearn.impute.MissingIndicator.html#sklearn.impute.MissingIndicator" title="sklearn.impute.MissingIndicator"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.MissingIndicator</span></code></a>. First, when
<code class="docutils literal notranslate"><span class="pre">X</span></code> is sparse, all the non-zero non missing values used to become
explicit False in the transformed data. Then, when
<code class="docutils literal notranslate"><span class="pre">features='missing-only'</span></code>, all features used to be kept if there were no
missing values at all. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13562">#13562</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</div>
<div class="section" id="id14">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.inspection" title="sklearn.inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a><a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
<p>(new subpackage)</p>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Partial dependence plots
(<a class="reference internal" href="../modules/generated/sklearn.inspection.plot_partial_dependence.html#sklearn.inspection.plot_partial_dependence" title="sklearn.inspection.plot_partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.plot_partial_dependence</span></code></a>) are now supported for
any regressor or classifier (provided that they have a <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code>
method). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12599">#12599</a> by <a class="reference external" href="https://github.com/trevorstephens">Trevor Stephens</a> and
<a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-isotonic">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.isotonic" title="sklearn.isotonic"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.isotonic</span></code></a><a class="headerlink" href="#sklearn-isotonic" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Allow different dtypes (such as float32) in
<a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression" title="sklearn.isotonic.IsotonicRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8769">#8769</a> by <a class="reference external" href="https://github.com/vene">Vlad Niculae</a></p></li>
</ul>
</div>
<div class="section" id="id15">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a><a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a> now preserves <code class="docutils literal notranslate"><span class="pre">float32</span></code> and
<code class="docutils literal notranslate"><span class="pre">float64</span></code> dtypes. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8769">#8769</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11000">#11000</a> by
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>, and <a class="reference external" href="https://github.com/massich">Joan Massich</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> now support Elastic-Net penalty,
with the ‘saga’ solver. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11646">#11646</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.linear_model.lars_path_gram.html#sklearn.linear_model.lars_path_gram" title="sklearn.linear_model.lars_path_gram"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.lars_path_gram</span></code></a>, which is
<a class="reference internal" href="../modules/generated/sklearn.linear_model.lars_path.html#sklearn.linear_model.lars_path" title="sklearn.linear_model.lars_path"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.lars_path</span></code></a> in the sufficient stats mode, allowing
users to compute <a class="reference internal" href="../modules/generated/sklearn.linear_model.lars_path.html#sklearn.linear_model.lars_path" title="sklearn.linear_model.lars_path"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.lars_path</span></code></a> without providing
<code class="docutils literal notranslate"><span class="pre">X</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11699">#11699</a> by <a class="reference external" href="https://github.com/yukuairoy">Kuai Yu</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.make_dataset</span></code> now preserves
<code class="docutils literal notranslate"><span class="pre">float32</span></code> and <code class="docutils literal notranslate"><span class="pre">float64</span></code> dtypes, reducing memory consumption in stochastic
gradient, SAG and SAGA solvers.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8769">#8769</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11000">#11000</a> by
<a class="reference external" href="https://github.com/NelleV">Nelle Varoquaux</a>, <a class="reference external" href="https://github.com/Henley13">Arthur Imbert</a>,
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>, and <a class="reference external" href="https://github.com/massich">Joan Massich</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> now supports an
unregularized objective when <code class="docutils literal notranslate"><span class="pre">penalty='none'</span></code> is passed. This is
equivalent to setting <code class="docutils literal notranslate"><span class="pre">C=np.inf</span></code> with l2 regularization. Not supported
by the liblinear solver. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12860">#12860</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <code class="docutils literal notranslate"><span class="pre">sparse_cg</span></code> solver in <a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a>
now supports fitting the intercept (i.e. <code class="docutils literal notranslate"><span class="pre">fit_intercept=True</span></code>) when
inputs are sparse. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13336">#13336</a> by <a class="reference external" href="https://github.com/btel">Bartosz Telenczuk</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  The coordinate descent solver used in <code class="docutils literal notranslate"><span class="pre">Lasso</span></code>, <code class="docutils literal notranslate"><span class="pre">ElasticNet</span></code>,
etc. now issues a <code class="docutils literal notranslate"><span class="pre">ConvergenceWarning</span></code> when it completes without meeting the
desired toleranbce.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11754">#11754</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13397">#13397</a> by <a class="reference external" href="https://github.com/brentfagan">Brent Fagan</a> and
<a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> with ‘saga’ solver, where the
weights would not be correctly updated in some cases.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11646">#11646</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed the posterior mean, posterior covariance and returned
regularization parameters in <a class="reference internal" href="../modules/generated/sklearn.linear_model.BayesianRidge.html#sklearn.linear_model.BayesianRidge" title="sklearn.linear_model.BayesianRidge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.BayesianRidge</span></code></a>. The
posterior mean and the posterior covariance were not the ones computed
with the last update of the regularization parameters and the returned
regularization parameters were not the final ones. Also fixed the formula of
the log marginal likelihood used to compute the score when
<code class="docutils literal notranslate"><span class="pre">compute_score=True</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12174">#12174</a> by
<a class="reference external" href="https://github.com/albertcthomas">Albert Thomas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LassoLarsIC.html#sklearn.linear_model.LassoLarsIC" title="sklearn.linear_model.LassoLarsIC"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LassoLarsIC</span></code></a>, where user input
<code class="docutils literal notranslate"><span class="pre">copy_X=False</span></code> at instance creation would be overridden by default
parameter value <code class="docutils literal notranslate"><span class="pre">copy_X=True</span></code> in <code class="docutils literal notranslate"><span class="pre">fit</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12972">#12972</a> by <a class="reference external" href="https://github.com/luk-f-a">Lucio Fernandez-Arjona</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression" title="sklearn.linear_model.LinearRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LinearRegression</span></code></a> that
was not returning the same coeffecients and intercepts with
<code class="docutils literal notranslate"><span class="pre">fit_intercept=True</span></code> in sparse and dense case.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13279">#13279</a> by <a class="reference external" href="http://alexandre.gramfort.net">Alexandre Gramfort</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.HuberRegressor.html#sklearn.linear_model.HuberRegressor" title="sklearn.linear_model.HuberRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.HuberRegressor</span></code></a> that was
broken when <code class="docutils literal notranslate"><span class="pre">X</span></code> was of dtype bool. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13328">#13328</a> by <a class="reference external" href="http://alexandre.gramfort.net">Alexandre Gramfort</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a performance issue of <code class="docutils literal notranslate"><span class="pre">saga</span></code> and <code class="docutils literal notranslate"><span class="pre">sag</span></code> solvers when called
in a <a class="reference external" href="https://joblib.readthedocs.io/en/latest/generated/joblib.Parallel.html#joblib.Parallel" title="(in joblib v0.14.1.dev0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">joblib.Parallel</span></code></a> setting with <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code> and
<code class="docutils literal notranslate"><span class="pre">backend=&quot;threading&quot;</span></code>, causing them to perform worse than in the sequential
case. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13389">#13389</a> by <a class="reference external" href="https://github.com/pierreglaser">Pierre Glaser</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in
<code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.stochastic_gradient.BaseSGDClassifier</span></code> that was not
deterministic when trained in a multi-class setting on several threads.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13422">#13422</a> by <a class="reference external" href="https://github.com/ClemDoum">Clément Doumouro</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.ridge_regression.html#sklearn.linear_model.ridge_regression" title="sklearn.linear_model.ridge_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.ridge_regression</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeClassifier.html#sklearn.linear_model.RidgeClassifier" title="sklearn.linear_model.RidgeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeClassifier</span></code></a> that
caused unhandled exception for arguments <code class="docutils literal notranslate"><span class="pre">return_intercept=True</span></code> and
<code class="docutils literal notranslate"><span class="pre">solver=auto</span></code> (default) or any other solver different from <code class="docutils literal notranslate"><span class="pre">sag</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13363">#13363</a> by <a class="reference external" href="https://github.com/btel">Bartosz Telenczuk</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.ridge_regression.html#sklearn.linear_model.ridge_regression" title="sklearn.linear_model.ridge_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.ridge_regression</span></code></a> will now raise an exception
if <code class="docutils literal notranslate"><span class="pre">return_intercept=True</span></code> and solver is different from <code class="docutils literal notranslate"><span class="pre">sag</span></code>. Previously,
only warning was issued. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13363">#13363</a> by <a class="reference external" href="https://github.com/btel">Bartosz Telenczuk</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.ridge_regression.html#sklearn.linear_model.ridge_regression" title="sklearn.linear_model.ridge_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.ridge_regression</span></code></a> will choose <code class="docutils literal notranslate"><span class="pre">sparse_cg</span></code>
solver for sparse inputs when <code class="docutils literal notranslate"><span class="pre">solver=auto</span></code> and <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code>
is provided (previously <code class="docutils literal notranslate"><span class="pre">cholesky</span></code> solver was selected).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13363">#13363</a> by <a class="reference external" href="https://github.com/btel">Bartosz Telenczuk</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>   The use of <a class="reference internal" href="../modules/generated/sklearn.linear_model.lars_path.html#sklearn.linear_model.lars_path" title="sklearn.linear_model.lars_path"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.lars_path</span></code></a> with <code class="docutils literal notranslate"><span class="pre">X=None</span></code>
while passing <code class="docutils literal notranslate"><span class="pre">Gram</span></code> is deprecated in version 0.21 and will be removed
in version 0.23. Use <a class="reference internal" href="../modules/generated/sklearn.linear_model.lars_path_gram.html#sklearn.linear_model.lars_path_gram" title="sklearn.linear_model.lars_path_gram"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.lars_path_gram</span></code></a> instead.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11699">#11699</a> by <a class="reference external" href="https://github.com/yukuairoy">Kuai Yu</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.logistic_regression_path.html#sklearn.linear_model.logistic_regression_path" title="sklearn.linear_model.logistic_regression_path"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.logistic_regression_path</span></code></a> is deprecated
in version 0.21 and will be removed in version 0.23.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12821">#12821</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeCV.html#sklearn.linear_model.RidgeCV" title="sklearn.linear_model.RidgeCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeCV</span></code></a> with generalized cross-validation
now correctly fits an intercept when <code class="docutils literal notranslate"><span class="pre">fit_intercept=True</span></code> and the design
matrix is sparse. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13350">#13350</a> by <a class="reference external" href="https://github.com/jeromedockes">Jérôme Dockès</a></p></li>
</ul>
</div>
<div class="section" id="sklearn-manifold">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.manifold" title="sklearn.manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a><a class="headerlink" href="#sklearn-manifold" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Make <code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.tsne.trustworthiness</span></code> use an inverted index
instead of an <code class="docutils literal notranslate"><span class="pre">np.where</span></code> lookup to find the rank of neighbors in the input
space. This improves efficiency in particular when computed with
lots of neighbors and/or small datasets.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/9907">#9907</a> by <a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
</ul>
</div>
<div class="section" id="id16">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.metrics" title="sklearn.metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a><a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added the <a class="reference internal" href="../modules/generated/sklearn.metrics.max_error.html#sklearn.metrics.max_error" title="sklearn.metrics.max_error"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.max_error</span></code></a> metric and a corresponding
<code class="docutils literal notranslate"><span class="pre">'max_error'</span></code> scorer for single output regression.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12232">#12232</a> by <a class="reference external" href="https://github.com/whiletruelearn">Krishna Sangeeth</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <a class="reference internal" href="../modules/generated/sklearn.metrics.multilabel_confusion_matrix.html#sklearn.metrics.multilabel_confusion_matrix" title="sklearn.metrics.multilabel_confusion_matrix"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.multilabel_confusion_matrix</span></code></a>, which calculates a
confusion matrix with true positive, false positive, false negative and true
negative counts for each class. This facilitates the calculation of set-wise
metrics such as recall, specificity, fall out and miss rate.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11179">#11179</a> by <a class="reference external" href="https://github.com/ShangwuYao">Shangwu Yao</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.metrics.jaccard_score.html#sklearn.metrics.jaccard_score" title="sklearn.metrics.jaccard_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.jaccard_score</span></code></a> has been added to calculate the
Jaccard coefficient as an evaluation metric for binary, multilabel and
multiclass tasks, with an interface analogous to <a class="reference internal" href="../modules/generated/sklearn.metrics.f1_score.html#sklearn.metrics.f1_score" title="sklearn.metrics.f1_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.f1_score</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13151">#13151</a> by <a class="reference external" href="https://github.com/gxyd">Gaurav Dhingra</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.haversine_distances.html#sklearn.metrics.pairwise.haversine_distances" title="sklearn.metrics.pairwise.haversine_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.haversine_distances</span></code></a> which can be
accessed with <code class="docutils literal notranslate"><span class="pre">metric='pairwise'</span></code> through <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances.html#sklearn.metrics.pairwise_distances" title="sklearn.metrics.pairwise_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise_distances</span></code></a>
and estimators. (Haversine distance was previously available for nearest
neighbors calculation.) <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12568">#12568</a> by <a class="reference external" href="https://github.com/xuewei4d">Wei Xue</a>,
<a class="reference external" href="https://github.com/eamanu">Emmanuel Arias</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Faster <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances.html#sklearn.metrics.pairwise_distances" title="sklearn.metrics.pairwise_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise_distances</span></code></a> with <code class="docutils literal notranslate"><span class="pre">n_jobs</span></code>
&gt; 1 by using a thread-based backend, instead of process-based backends.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8216">#8216</a> by <a class="reference external" href="https://github.com/pierreglaser">Pierre Glaser</a> and
<a class="reference external" href="https://github.com/zanospi">Romuald Menuet</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  The pairwise manhattan distances with sparse input now uses the
BLAS shipped with scipy instead of the bundled BLAS. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12732">#12732</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Use label <code class="docutils literal notranslate"><span class="pre">accuracy</span></code> instead of <code class="docutils literal notranslate"><span class="pre">micro-average</span></code> on
<a class="reference internal" href="../modules/generated/sklearn.metrics.classification_report.html#sklearn.metrics.classification_report" title="sklearn.metrics.classification_report"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.classification_report</span></code></a> to avoid confusion. <code class="docutils literal notranslate"><span class="pre">micro-average</span></code> is
only shown for multi-label or multi-class with a subset of classes because
it is otherwise identical to accuracy.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12334">#12334</a> by <a class="reference external" href="https://github.com/eamanu&#64;eamanu.com">Emmanuel Arias</a>,
<a class="reference external" href="https://joelnothman.com/">Joel Nothman</a> and <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Added <code class="docutils literal notranslate"><span class="pre">beta</span></code> parameter to
<a class="reference internal" href="../modules/generated/sklearn.metrics.homogeneity_completeness_v_measure.html#sklearn.metrics.homogeneity_completeness_v_measure" title="sklearn.metrics.homogeneity_completeness_v_measure"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.homogeneity_completeness_v_measure</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.metrics.v_measure_score.html#sklearn.metrics.v_measure_score" title="sklearn.metrics.v_measure_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.v_measure_score</span></code></a> to configure the
tradeoff between homogeneity and completeness.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13607">#13607</a> by <a class="reference external" href="https://github.com/scouvreur">Stephane Couvreur</a> and
and <a class="reference external" href="https://github.com/ivsanro1">Ivan Sanchez</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  The metric <a class="reference internal" href="../modules/generated/sklearn.metrics.r2_score.html#sklearn.metrics.r2_score" title="sklearn.metrics.r2_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.r2_score</span></code></a> is degenerate with a single sample
and now it returns NaN and raises <a class="reference internal" href="../modules/generated/sklearn.exceptions.UndefinedMetricWarning.html#sklearn.exceptions.UndefinedMetricWarning" title="sklearn.exceptions.UndefinedMetricWarning"><code class="xref py py-class docutils literal notranslate"><span class="pre">exceptions.UndefinedMetricWarning</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12855">#12855</a> by <a class="reference external" href="https://github.com/psendyk">Pawel Sendyk</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.metrics.brier_score_loss.html#sklearn.metrics.brier_score_loss" title="sklearn.metrics.brier_score_loss"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.brier_score_loss</span></code></a> will sometimes
return incorrect result when there’s only one class in <code class="docutils literal notranslate"><span class="pre">y_true</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13628">#13628</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.label_ranking_average_precision_score.html#sklearn.metrics.label_ranking_average_precision_score" title="sklearn.metrics.label_ranking_average_precision_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.label_ranking_average_precision_score</span></code></a>
where sample_weight wasn’t taken into account for samples with degenerate
labels.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13447">#13447</a> by <a class="reference external" href="https://github.com/dpwe">Dan Ellis</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The parameter <code class="docutils literal notranslate"><span class="pre">labels</span></code> in <a class="reference internal" href="../modules/generated/sklearn.metrics.hamming_loss.html#sklearn.metrics.hamming_loss" title="sklearn.metrics.hamming_loss"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.hamming_loss</span></code></a> is deprecated
in version 0.21 and will be removed in version 0.23. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/10580">#10580</a> by
<a class="reference external" href="https://github.com/reshamas">Reshama Shaikh</a> and <a class="reference external" href="https://github.com/SandraMNE">Sandra Mitrovic</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  The function <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.euclidean_distances.html#sklearn.metrics.pairwise.euclidean_distances" title="sklearn.metrics.pairwise.euclidean_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.euclidean_distances</span></code></a>, and
therefore several estimators with <code class="docutils literal notranslate"><span class="pre">metric='euclidean'</span></code>, suffered from
numerical precision issues with <code class="docutils literal notranslate"><span class="pre">float32</span></code> features. Precision has been
increased at the cost of a small drop of performance. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13554">#13554</a> by
<a class="reference external" href="https://github.com/Celelibi">&#64;Celelibi</a> and <a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.metrics.jaccard_similarity_score.html#sklearn.metrics.jaccard_similarity_score" title="sklearn.metrics.jaccard_similarity_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.jaccard_similarity_score</span></code></a> is deprecated in favour of
the more consistent <a class="reference internal" href="../modules/generated/sklearn.metrics.jaccard_score.html#sklearn.metrics.jaccard_score" title="sklearn.metrics.jaccard_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.jaccard_score</span></code></a>. The former behavior for
binary and multiclass targets is broken.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13151">#13151</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-mixture">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.mixture" title="sklearn.mixture"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a><a class="headerlink" href="#sklearn-mixture" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BaseMixture</span></code> and therefore on estimators
based on it, i.e. <a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" title="sklearn.mixture.BayesianGaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BayesianGaussianMixture</span></code></a>, where <code class="docutils literal notranslate"><span class="pre">fit_predict</span></code> and
<code class="docutils literal notranslate"><span class="pre">fit.predict</span></code> were not equivalent. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13142">#13142</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-model-selection">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a><a class="headerlink" href="#sklearn-model-selection" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Classes <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">GridSearchCV</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">RandomizedSearchCV</span></code></a> now allow for refit=callable
to add flexibility in identifying the best estimator.
See <a class="reference internal" href="../auto_examples/model_selection/plot_grid_search_refit_callable.html#sphx-glr-auto-examples-model-selection-plot-grid-search-refit-callable-py"><span class="std std-ref">Balance model complexity and cross-validated score</span></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11354">#11354</a> by <a class="reference external" href="https://github.com/wenhaoz&#64;ucla.edu">Wenhao Zhang</a>,
<a class="reference external" href="https://joelnothman.com/">Joel Nothman</a> and <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Classes <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">GridSearchCV</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">RandomizedSearchCV</span></code></a>, and methods
<a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_val_score.html#sklearn.model_selection.cross_val_score" title="sklearn.model_selection.cross_val_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">cross_val_score</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_val_predict.html#sklearn.model_selection.cross_val_predict" title="sklearn.model_selection.cross_val_predict"><code class="xref py py-func docutils literal notranslate"><span class="pre">cross_val_predict</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_validate.html#sklearn.model_selection.cross_validate" title="sklearn.model_selection.cross_validate"><code class="xref py py-func docutils literal notranslate"><span class="pre">cross_validate</span></code></a>, now print train scores when
<code class="docutils literal notranslate"><span class="pre">return_train_scores</span></code> is True and <code class="docutils literal notranslate"><span class="pre">verbose</span></code> &gt; 2. For
<a class="reference internal" href="../modules/generated/sklearn.model_selection.learning_curve.html#sklearn.model_selection.learning_curve" title="sklearn.model_selection.learning_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">learning_curve</span></code></a>, and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.validation_curve.html#sklearn.model_selection.validation_curve" title="sklearn.model_selection.validation_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">validation_curve</span></code></a> only the latter is required.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12613">#12613</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12669">#12669</a> by <a class="reference external" href="https://github.com/marctorrellas">Marc Torrellas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Some <a class="reference internal" href="../glossary.html#term-cv-splitter"><span class="xref std std-term">CV splitter</span></a> classes and
<code class="docutils literal notranslate"><span class="pre">model_selection.train_test_split</span></code> now raise <code class="docutils literal notranslate"><span class="pre">ValueError</span></code> when the
resulting training set is empty.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12861">#12861</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedKFold.html#sklearn.model_selection.StratifiedKFold" title="sklearn.model_selection.StratifiedKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedKFold</span></code></a>
shuffles each class’s samples with the same <code class="docutils literal notranslate"><span class="pre">random_state</span></code>,
making <code class="docutils literal notranslate"><span class="pre">shuffle=True</span></code> ineffective.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13124">#13124</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Added ability for <a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_val_predict.html#sklearn.model_selection.cross_val_predict" title="sklearn.model_selection.cross_val_predict"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.cross_val_predict</span></code></a> to handle
multi-label (and multioutput-multiclass) targets with <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code>-type
methods. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8773">#8773</a> by <a class="reference external" href="https://github.com/stephen-hoover">Stephen Hoover</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue in <a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_val_predict.html#sklearn.model_selection.cross_val_predict" title="sklearn.model_selection.cross_val_predict"><code class="xref py py-func docutils literal notranslate"><span class="pre">cross_val_predict</span></code></a> where
<code class="docutils literal notranslate"><span class="pre">method=&quot;predict_proba&quot;</span></code> returned always <code class="docutils literal notranslate"><span class="pre">0.0</span></code> when one of the classes was
excluded in a cross-validation fold.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13366">#13366</a> by <a class="reference external" href="https://github.com/gfournier">Guillaume Fournier</a></p></li>
</ul>
</div>
<div class="section" id="sklearn-multiclass">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.multiclass" title="sklearn.multiclass"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multiclass</span></code></a><a class="headerlink" href="#sklearn-multiclass" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue in <a class="reference internal" href="../modules/generated/sklearn.multiclass.OneVsOneClassifier.html#sklearn.multiclass.OneVsOneClassifier.decision_function" title="sklearn.multiclass.OneVsOneClassifier.decision_function"><code class="xref py py-func docutils literal notranslate"><span class="pre">multiclass.OneVsOneClassifier.decision_function</span></code></a>
where the decision_function value of a given sample was different depending on
whether the decision_function was evaluated on the sample alone or on a batch
containing this same sample due to the scaling used in decision_function.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/10440">#10440</a> by <a class="reference external" href="https://github.com/Johayon">Jonathan Ohayon</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-multioutput">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.multioutput" title="sklearn.multioutput"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multioutput</span></code></a><a class="headerlink" href="#sklearn-multioutput" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.multioutput.MultiOutputClassifier.html#sklearn.multioutput.MultiOutputClassifier" title="sklearn.multioutput.MultiOutputClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">multioutput.MultiOutputClassifier</span></code></a> where the
<code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> method incorrectly checked for <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> attribute in
the estimator object.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12222">#12222</a> by <a class="reference external" href="https://github.com/rebekahkim">Rebekah Kim</a></p></li>
</ul>
</div>
<div class="section" id="id17">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.neighbors.NeighborhoodComponentsAnalysis.html#sklearn.neighbors.NeighborhoodComponentsAnalysis" title="sklearn.neighbors.NeighborhoodComponentsAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.NeighborhoodComponentsAnalysis</span></code></a> for
metric learning, which implements the Neighborhood Components Analysis
algorithm.  <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/10058">#10058</a> by <a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a> and
<a class="reference external" href="https://github.com/johny-c">John Chiotellis</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Methods in <a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors" title="sklearn.neighbors.NearestNeighbors"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.NearestNeighbors</span></code></a> :
<a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors.kneighbors" title="sklearn.neighbors.NearestNeighbors.kneighbors"><code class="xref py py-func docutils literal notranslate"><span class="pre">kneighbors</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors.radius_neighbors" title="sklearn.neighbors.NearestNeighbors.radius_neighbors"><code class="xref py py-func docutils literal notranslate"><span class="pre">radius_neighbors</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors.kneighbors_graph" title="sklearn.neighbors.NearestNeighbors.kneighbors_graph"><code class="xref py py-func docutils literal notranslate"><span class="pre">kneighbors_graph</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors.radius_neighbors_graph" title="sklearn.neighbors.NearestNeighbors.radius_neighbors_graph"><code class="xref py py-func docutils literal notranslate"><span class="pre">radius_neighbors_graph</span></code></a>
now raise <code class="docutils literal notranslate"><span class="pre">NotFittedError</span></code>, rather than <code class="docutils literal notranslate"><span class="pre">AttributeError</span></code>,
when called before <code class="docutils literal notranslate"><span class="pre">fit</span></code> <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12279">#12279</a> by <a class="reference external" href="https://github.com/whiletruelearn">Krishna Sangeeth</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-neural-network">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neural_network" title="sklearn.neural_network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a><a class="headerlink" href="#sklearn-neural-network" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPRegressor</span></code></a> where the option <code class="code docutils literal notranslate"><span class="pre">shuffle=False</span></code>
was being ignored. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12582">#12582</a> by <a class="reference external" href="https://github.com/samwaterbury">Sam Waterbury</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> where
validation sets for early stopping were not sampled with stratification. In
the multilabel case however, splits are still not stratified.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13164">#13164</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-pipeline">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.pipeline" title="sklearn.pipeline"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.pipeline</span></code></a><a class="headerlink" href="#sklearn-pipeline" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a> can now use indexing notation (e.g.
<code class="docutils literal notranslate"><span class="pre">my_pipeline[0:-1]</span></code>) to extract a subsequence of steps as another Pipeline
instance.  A Pipeline can also be indexed directly to extract a particular
step (e.g. <code class="docutils literal notranslate"><span class="pre">my_pipeline['svc']</span></code>), rather than accessing <code class="docutils literal notranslate"><span class="pre">named_steps</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/2568">#2568</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added optional parameter <code class="docutils literal notranslate"><span class="pre">verbose</span></code> in <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.pipeline.FeatureUnion.html#sklearn.pipeline.FeatureUnion" title="sklearn.pipeline.FeatureUnion"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.FeatureUnion</span></code></a>
and corresponding <code class="docutils literal notranslate"><span class="pre">make_</span></code> helpers for showing progress and timing of
each step. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11364">#11364</a> by <a class="reference external" href="https://github.com/petrushev">Baze Petrushev</a>,
<a class="reference external" href="https://github.com/karandesai-96">Karan Desai</a>, <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>, and
<a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a> now supports using <code class="docutils literal notranslate"><span class="pre">'passthrough'</span></code>
as a transformer, with the same effect as <code class="docutils literal notranslate"><span class="pre">None</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11144">#11144</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a>  implements <code class="docutils literal notranslate"><span class="pre">__len__</span></code> and
therefore <code class="docutils literal notranslate"><span class="pre">len(pipeline)</span></code> returns the number of steps in the pipeline.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13439">#13439</a> by <a class="reference external" href="https://github.com/LakshKD">Lakshya KD</a>.</p></li>
</ul>
</div>
<div class="section" id="id18">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a><a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> now supports dropping one
feature per category with a new drop parameter. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12908">#12908</a> by
<a class="reference external" href="https://github.com/drewmjohnston">Drew Johnston</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.OrdinalEncoder.html#sklearn.preprocessing.OrdinalEncoder" title="sklearn.preprocessing.OrdinalEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OrdinalEncoder</span></code></a> now handle pandas DataFrames more
efficiently. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13253">#13253</a> by <a class="reference external" href="https://github.com/maikia">&#64;maikia</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Make <a class="reference internal" href="../modules/generated/sklearn.preprocessing.MultiLabelBinarizer.html#sklearn.preprocessing.MultiLabelBinarizer" title="sklearn.preprocessing.MultiLabelBinarizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.MultiLabelBinarizer</span></code></a> cache class
mappings instead of calculating it every time on the fly.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12116">#12116</a> by <a class="reference external" href="https://github.com/kiote">Ekaterina Krivich</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.preprocessing.PolynomialFeatures.html#sklearn.preprocessing.PolynomialFeatures" title="sklearn.preprocessing.PolynomialFeatures"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.PolynomialFeatures</span></code></a> now supports
compressed sparse row (CSR) matrices as input for degrees 2 and 3. This is
typically much faster than the dense case as it scales with matrix density
and expansion degree (on the order of density^degree), and is much, much
faster than the compressed sparse column (CSC) case.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12197">#12197</a> by <a class="reference external" href="https://github.com/awnystrom">Andrew Nystrom</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Speed improvement in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.PolynomialFeatures.html#sklearn.preprocessing.PolynomialFeatures" title="sklearn.preprocessing.PolynomialFeatures"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.PolynomialFeatures</span></code></a>,
in the dense case. Also added a new parameter <code class="docutils literal notranslate"><span class="pre">order</span></code> which controls output
order for further speed performances. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12251">#12251</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed the calculation overflow when using a float16 dtype with
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler" title="sklearn.preprocessing.StandardScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.StandardScaler</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13007">#13007</a> by <a class="reference external" href="https://github.com/baluyotraf">Raffaello Baluyot</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.QuantileTransformer.html#sklearn.preprocessing.QuantileTransformer" title="sklearn.preprocessing.QuantileTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.QuantileTransformer</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.quantile_transform.html#sklearn.preprocessing.quantile_transform" title="sklearn.preprocessing.quantile_transform"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.quantile_transform</span></code></a> to force n_quantiles to be at most
equal to n_samples. Values of n_quantiles larger than n_samples were either
useless or resulting in a wrong approximation of the cumulative distribution
function estimator. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13333">#13333</a> by <a class="reference external" href="https://github.com/albertcthomas">Albert Thomas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default value of <code class="docutils literal notranslate"><span class="pre">copy</span></code> in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.quantile_transform.html#sklearn.preprocessing.quantile_transform" title="sklearn.preprocessing.quantile_transform"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.quantile_transform</span></code></a>
will change from False to True in 0.23 in order to make it more consistent
with the default <code class="docutils literal notranslate"><span class="pre">copy</span></code> values of other functions in
<code class="xref py py-mod docutils literal notranslate"><span class="pre">preprocessing</span></code> and prevent unexpected side effects by modifying
the value of <code class="docutils literal notranslate"><span class="pre">X</span></code> inplace.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13459">#13459</a> by <a class="reference external" href="https://github.com/HunterMcGushion">Hunter McGushion</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-svm">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.svm" title="sklearn.svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a><a class="headerlink" href="#sklearn-svm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue in <a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC.decision_function" title="sklearn.svm.SVC.decision_function"><code class="xref py py-func docutils literal notranslate"><span class="pre">svm.SVC.decision_function</span></code></a> when
<code class="docutils literal notranslate"><span class="pre">decision_function_shape='ovr'</span></code>. The decision_function value of a given
sample was different depending on whether the decision_function was evaluated
on the sample alone or on a batch containing this same sample due to the
scaling used in decision_function.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/10440">#10440</a> by <a class="reference external" href="https://github.com/Johayon">Jonathan Ohayon</a>.</p></li>
</ul>
</div>
<div class="section" id="id19">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.tree" title="sklearn.tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a><a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Decision Trees can now be plotted with matplotlib using
<a class="reference internal" href="../modules/generated/sklearn.tree.plot_tree.html#sklearn.tree.plot_tree" title="sklearn.tree.plot_tree"><code class="xref py py-func docutils literal notranslate"><span class="pre">tree.plot_tree</span></code></a> without relying on the <code class="docutils literal notranslate"><span class="pre">dot</span></code> library,
removing a hard-to-install dependency. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8508">#8508</a> by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Decision Trees can now be exported in a human readable
textual format using <a class="reference internal" href="../modules/generated/sklearn.tree.export_text.html#sklearn.tree.export_text" title="sklearn.tree.export_text"><code class="xref py py-func docutils literal notranslate"><span class="pre">tree.export_text</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/6261">#6261</a> by <code class="docutils literal notranslate"><span class="pre">Giuseppe</span> <span class="pre">Vettigli</span> <span class="pre">&lt;JustGlowing&gt;</span></code>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <code class="docutils literal notranslate"><span class="pre">get_n_leaves()</span></code> and <code class="docutils literal notranslate"><span class="pre">get_depth()</span></code> have been added to
<code class="xref py py-class docutils literal notranslate"><span class="pre">tree.BaseDecisionTree</span></code> and consequently all estimators based
on it, including <a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier" title="sklearn.tree.DecisionTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeRegressor.html#sklearn.tree.DecisionTreeRegressor" title="sklearn.tree.DecisionTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeRegressor</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeClassifier.html#sklearn.tree.ExtraTreeClassifier" title="sklearn.tree.ExtraTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeClassifier</span></code></a>,
and <a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeRegressor.html#sklearn.tree.ExtraTreeRegressor" title="sklearn.tree.ExtraTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeRegressor</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12300">#12300</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Trees and forests did not previously <code class="docutils literal notranslate"><span class="pre">predict</span></code> multi-output
classification targets with string labels, despite accepting them in <code class="docutils literal notranslate"><span class="pre">fit</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11458">#11458</a> by <a class="reference external" href="https://github.com/mitar">Mitar Milutinovic</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue with <code class="xref py py-class docutils literal notranslate"><span class="pre">tree.BaseDecisionTree</span></code>
and consequently all estimators based
on it, including <a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier" title="sklearn.tree.DecisionTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeRegressor.html#sklearn.tree.DecisionTreeRegressor" title="sklearn.tree.DecisionTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeRegressor</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeClassifier.html#sklearn.tree.ExtraTreeClassifier" title="sklearn.tree.ExtraTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeClassifier</span></code></a>,
and <a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeRegressor.html#sklearn.tree.ExtraTreeRegressor" title="sklearn.tree.ExtraTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeRegressor</span></code></a>, where they used to exceed the given
<code class="docutils literal notranslate"><span class="pre">max_depth</span></code> by 1 while expanding the tree if <code class="docutils literal notranslate"><span class="pre">max_leaf_nodes</span></code> and
<code class="docutils literal notranslate"><span class="pre">max_depth</span></code> were both specified by the user. Please note that this also
affects all ensemble methods using decision trees.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12344">#12344</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-utils">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.utils" title="sklearn.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a><a class="headerlink" href="#sklearn-utils" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.utils.resample.html#sklearn.utils.resample" title="sklearn.utils.resample"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.resample</span></code></a> now accepts a <code class="docutils literal notranslate"><span class="pre">stratify</span></code> parameter for
sampling according to class distributions. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13549">#13549</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas
Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecated <code class="docutils literal notranslate"><span class="pre">warn_on_dtype</span></code> parameter from <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.utils.check_X_y.html#sklearn.utils.check_X_y" title="sklearn.utils.check_X_y"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_X_y</span></code></a>. Added explicit warning for dtype conversion
in <code class="xref py py-func docutils literal notranslate"><span class="pre">check_pairwise_arrays</span></code> if the <code class="docutils literal notranslate"><span class="pre">metric</span></code> being passed is a
pairwise boolean metric.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13382">#13382</a> by <a class="reference external" href="https://github.com/praths007">Prathmesh Savale</a>.</p></li>
</ul>
</div>
<div class="section" id="multiple-modules">
<h3>Multiple modules<a class="headerlink" href="#multiple-modules" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  The <code class="docutils literal notranslate"><span class="pre">__repr__()</span></code> method of all estimators (used when calling
<code class="docutils literal notranslate"><span class="pre">print(estimator)</span></code>) has been entirely re-written, building on Python’s
pretty printing standard library. All parameters are printed by default,
but this can be altered with the <code class="docutils literal notranslate"><span class="pre">print_changed_only</span></code> option in
<a class="reference internal" href="../modules/generated/sklearn.set_config.html#sklearn.set_config" title="sklearn.set_config"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.set_config</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11705">#11705</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Add estimators tags: these are annotations of estimators
that allow programmatic inspection of their capabilities, such as sparse
matrix support, supported output types and supported methods. Estimator
tags also determine the tests that are run on an estimator when
<code class="docutils literal notranslate"><span class="pre">check_estimator</span></code> is called. Read more in the <a class="reference internal" href="../developers/develop.html#estimator-tags"><span class="std std-ref">User Guide</span></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8022">#8022</a> by <a class="reference external" href="https://github.com/amueller">Andreas Müller</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Memory copies are avoided when casting arrays to a different
dtype in multiple estimators. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11973">#11973</a> by <a class="reference external" href="https://github.com/rth">Roman Yurchak</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in the implementation of the <code class="xref py py-func docutils literal notranslate"><span class="pre">our_rand_r</span></code>
helper function that was not behaving consistently across platforms.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13422">#13422</a> by <a class="reference external" href="https://github.com/jdnc">Madhura Parikh</a> and
<a class="reference external" href="https://github.com/ClemDoum">Clément Doumouro</a>.</p></li>
</ul>
</div>
<div class="section" id="miscellaneous">
<h3>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Joblib is no longer vendored in scikit-learn, and becomes a
dependency. Minimal supported version is joblib 0.11, however using
version &gt;= 0.13 is strongly recommended.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13531">#13531</a> by <a class="reference external" href="https://github.com/rth">Roman Yurchak</a>.</p></li>
</ul>
</div>
</div>
<div class="section" id="changes-to-estimator-checks">
<h2>Changes to estimator checks<a class="headerlink" href="#changes-to-estimator-checks" title="Permalink to this headline">¶</a></h2>
<p>These changes mostly affect library developers.</p>
<ul class="simple">
<li><p>Add <code class="docutils literal notranslate"><span class="pre">check_fit_idempotent</span></code> to
<a class="reference internal" href="../modules/generated/sklearn.utils.estimator_checks.check_estimator.html#sklearn.utils.estimator_checks.check_estimator" title="sklearn.utils.estimator_checks.check_estimator"><code class="xref py py-func docutils literal notranslate"><span class="pre">check_estimator</span></code></a>, which checks that
when <code class="docutils literal notranslate"><span class="pre">fit</span></code> is called twice with the same data, the ouput of
<code class="docutils literal notranslate"><span class="pre">predict</span></code>, <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code>, <code class="docutils literal notranslate"><span class="pre">transform</span></code>, and <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> does not
change. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12328">#12328</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a></p></li>
<li><p>Many checks can now be disabled or configured with <a class="reference internal" href="../developers/develop.html#estimator-tags"><span class="std std-ref">Estimator Tags</span></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/8022">#8022</a> by <a class="reference external" href="https://github.com/amueller">Andreas Müller</a>.</p></li>
</ul>
</div>
<div class="section" id="code-and-documentation-contributors">
<h2>Code and Documentation Contributors<a class="headerlink" href="#code-and-documentation-contributors" title="Permalink to this headline">¶</a></h2>
<p>Thanks to everyone who has contributed to the maintenance and improvement of the
project since version 0.20, including:</p>
<p>adanhawth, Aditya Vyas, Adrin Jalali, Agamemnon Krasoulis, Albert Thomas,
Alberto Torres, Alexandre Gramfort, amourav, Andrea Navarrete, Andreas Mueller,
Andrew Nystrom, assiaben, Aurélien Bellet, Bartosz Michałowski, Bartosz
Telenczuk, bauks, BenjaStudio, bertrandhaut, Bharat Raghunathan, brentfagan,
Bryan Woods, Cat Chenal, Cheuk Ting Ho, Chris Choe, Christos Aridas, Clément
Doumouro, Cole Smith, Connossor, Corey Levinson, Dan Ellis, Dan Stine, Danylo
Baibak, daten-kieker, Denis Kataev, Didi Bar-Zev, Dillon Gardner, Dmitry Mottl,
Dmitry Vukolov, Dougal J. Sutherland, Dowon, drewmjohnston, Dror Atariah,
Edward J Brown, Ekaterina Krivich, Elizabeth Sander, Emmanuel Arias, Eric
Chang, Eric Larson, Erich Schubert, esvhd, Falak, Feda Curic, Federico Caselli,
Frank Hoang, Fibinse Xavier`, Finn O’Shea, Gabriel Marzinotto, Gabriel Vacaliuc,
Gabriele Calvo, Gael Varoquaux, GauravAhlawat, Giuseppe Vettigli, Greg Gandenberger,
Guillaume Fournier, Guillaume Lemaitre, Gustavo De Mari Pereira, Hanmin Qin,
haroldfox, hhu-luqi, Hunter McGushion, Ian Sanders, JackLangerman, Jacopo
Notarstefano, jakirkham, James Bourbeau, Jan Koch, Jan S, janvanrijn, Jarrod
Millman, jdethurens, jeremiedbb, JF, joaak, Joan Massich, Joel Nothman,
Jonathan Ohayon, Joris Van den Bossche, josephsalmon, Jérémie Méhault, Katrin
Leinweber, ken, kms15, Koen, Kossori Aruku, Krishna Sangeeth, Kuai Yu, Kulbear,
Kushal Chauhan, Kyle Jackson, Lakshya KD, Leandro Hermida, Lee Yi Jie Joel,
Lily Xiong, Lisa Sarah Thomas, Loic Esteve, louib, luk-f-a, maikia, mail-liam,
Manimaran, Manuel López-Ibáñez, Marc Torrellas, Marco Gaido, Marco Gorelli,
MarcoGorelli, marineLM, Mark Hannel, Martin Gubri, Masstran, mathurinm, Matthew
Roeschke, Max Copeland, melsyt, mferrari3, Mickaël Schoentgen, Ming Li, Mitar,
Mohammad Aftab, Mohammed AbdelAal, Mohammed Ibraheem, Muhammad Hassaan Rafique,
mwestt, Naoya Iijima, Nicholas Smith, Nicolas Goix, Nicolas Hug, Nikolay
Shebanov, Oleksandr Pavlyk, Oliver Rausch, Olivier Grisel, Orestis, Osman, Owen
Flanagan, Paul Paczuski, Pavel Soriano, pavlos kallis, Pawel Sendyk, peay,
Peter, Peter Cock, Peter Hausamann, Peter Marko, Pierre Glaser, pierretallotte,
Pim de Haan, Piotr Szymański, Prabakaran Kumaresshan, Pradeep Reddy Raamana,
Prathmesh Savale, Pulkit Maloo, Quentin Batista, Radostin Stoyanov, Raf
Baluyot, Rajdeep Dua, Ramil Nugmanov, Raúl García Calvo, Rebekah Kim, Reshama
Shaikh, Rohan Lekhwani, Rohan Singh, Rohan Varma, Rohit Kapoor, Roman
Feldbauer, Roman Yurchak, Romuald M, Roopam Sharma, Ryan, Rüdiger Busche, Sam
Waterbury, Samuel O. Ronsin, SandroCasagrande, Scott Cole, Scott Lowe,
Sebastian Raschka, Shangwu Yao, Shivam Kotwalia, Shiyu Duan, smarie, Sriharsha
Hatwar, Stephen Hoover, Stephen Tierney, Stéphane Couvreur, surgan12,
SylvainLan, TakingItCasual, Tashay Green, thibsej, Thomas Fan, Thomas J Fan,
Thomas Moreau, Tom Dupré la Tour, Tommy, Tulio Casagrande, Umar Farouk Umar,
Utkarsh Upadhyay, Vinayak Mehta, Vishaal Kapoor, Vivek Kumar, Vlad Niculae,
vqean3, Wenhao Zhang, William de Vazelhes, xhan, Xing Han Lu, xinyuliu12,
Yaroslav Halchenko, Zach Griffith, Zach Miller, Zayd Hammoudeh, Zhuyi Xue,
Zijie (ZJ) Poh, ^__^</p>
</div>
</div>


      </div>
    <div class="container">
      <footer class="sk-content-footer">
            &copy; 2007 - 2019, scikit-learn developers (BSD License).
          <a href="../_sources/whats_new/v0.21.rst.txt" rel="nofollow">Show this page source</a>
      </footer>
    </div>
  </div>
</div>
<script src="../_static/js/vendor/bootstrap.min.js"></script>

<script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', 'UA-22606712-2', 'auto');
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>


<script>
$(document).ready(function() {
    /* Add a [>>>] button on the top-right corner of code samples to hide
     * the >>> and ... prompts and the output and thus make the code
     * copyable. */
    var div = $('.highlight-python .highlight,' +
                '.highlight-python3 .highlight,' +
                '.highlight-pycon .highlight,' +
		'.highlight-default .highlight')
    var pre = div.find('pre');

    // get the styles from the current theme
    pre.parent().parent().css('position', 'relative');
    var hide_text = 'Hide prompts and outputs';
    var show_text = 'Show prompts and outputs';

    // create and add the button to all the code blocks that contain >>>
    div.each(function(index) {
        var jthis = $(this);
        if (jthis.find('.gp').length > 0) {
            var button = $('<span class="copybutton">&gt;&gt;&gt;</span>');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
            jthis.prepend(button);
        }
        // tracebacks (.gt) contain bare text elements that need to be
        // wrapped in a span to work with .nextUntil() (see later)
        jthis.find('pre:has(.gt)').contents().filter(function() {
            return ((this.nodeType == 3) && (this.data.trim().length > 0));
        }).wrap('<span>');
    });

    // define the behavior of the button when it's clicked
    $('.copybutton').click(function(e){
        e.preventDefault();
        var button = $(this);
        if (button.data('hidden') === 'false') {
            // hide the code output
            button.parent().find('.go, .gp, .gt').hide();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
            button.css('text-decoration', 'line-through');
            button.attr('title', show_text);
            button.data('hidden', 'true');
        } else {
            // show the code output
            button.parent().find('.go, .gp, .gt').show();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
            button.css('text-decoration', 'none');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
        }
    });

	/*** Add permalink buttons next to glossary terms ***/
	$('dl.glossary > dt[id]').append(function() {
		return ('<a class="headerlink" href="#' +
			    this.getAttribute('id') +
			    '" title="Permalink to this term">¶</a>');
	});
  /*** Hide navbar when scrolling down ***/
  // Returns true when headerlink target matches hash in url
  (function() {
    hashTargetOnTop = function() {
        var hash = window.location.hash;
        if ( hash.length < 2 ) { return false; }

        var target = document.getElementById( hash.slice(1) );
        if ( target === null ) { return false; }

        var top = target.getBoundingClientRect().top;
        return (top < 2) && (top > -2);
    };

    // Hide navbar on load if hash target is on top
    var navBar = document.getElementById("navbar");
    var navBarToggler = document.getElementById("sk-navbar-toggler");
    var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px";
    var $window = $(window);

    hideNavBar = function() {
        navBar.style.top = navBarHeightHidden;
    };

    showNavBar = function() {
        navBar.style.top = "0";
    }

    if (hashTargetOnTop()) {
        hideNavBar()
    }

    var prevScrollpos = window.pageYOffset;
    hideOnScroll = function(lastScrollTop) {
        if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) {
            return;
        }
        if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){
            hideNavBar()
        } else {
            showNavBar()
        }
        prevScrollpos = lastScrollTop;
    };

    /*** high preformance scroll event listener***/
    var raf = window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        window.oRequestAnimationFrame;
    var lastScrollTop = $window.scrollTop();

    if (raf) {
        loop();
    }

    function loop() {
        var scrollTop = $window.scrollTop();
        if (lastScrollTop === scrollTop) {
            raf(loop);
            return;
        } else {
            lastScrollTop = scrollTop;
            hideOnScroll(lastScrollTop);
            raf(loop);
        }
    }
  })();
});

</script>
    
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
    
</body>
</html>